<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qextserialhelper.cpp -->
  <title>QtExtSerialPort : QextSerialHelper Class</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="postheader" valign="center"><a href="index.html">Home</a> &middot; <a href="classes.html">All Classes</a> &middot;</td></tr></table><li><a href="http://doc.qt.nokia.com/qt5/modules.html">Modules</a></li>
<li>QtExtSerialPort</li>
<li>QextSerialHelper</li>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QextSerialHelper Class</h1>
<!-- $$$QextSerialHelper-brief -->
<p>The QextSerialHelper class provides some convenient functions to ease the use of <a href="qextserialport.html">QextSerialPort</a>. <a href="#details">More...</a></p>
<!-- @@@QextSerialHelper -->
<pre class="cpp">    <span class="preprocessor">#include &lt;QextSerialHelper&gt;</span></pre><p><b>Inherits: </b><a href="http://doc.qt.nokia.com/qt5/qobject.html">QObject</a>.</p>
<ul>
<li><a href="qextserialhelper-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#fromBaudRateType">fromBaudRateType</a></b>(QextSerialPort::BaudRateType<i> value</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#fromDataBitsType">fromDataBitsType</a></b>(QextSerialPort::DataBitsType<i> value</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#fromFlowType">fromFlowType</a></b>(QextSerialPort::FlowType<i> value</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#fromParityType">fromParityType</a></b>(QextSerialPort::ParityType<i> value</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#fromStopBitsType">fromStopBitsType</a></b>(QextSerialPort::StopBitsType<i> value</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getBaudRateList">getBaudRateList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getDataBitsList">getDataBitsList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getFlowList">getFlowList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getParityList">getParityList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getPortNameList">getPortNameList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#getStopBitsList">getStopBitsList</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QextSerialPort::BaudRateType </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#toBaudRateType">toBaudRateType</a></b>(const QString &amp;<i> key</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QextSerialPort::DataBitsType </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#toDataBitsType">toDataBitsType</a></b>(const QString &amp;<i> key</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QextSerialPort::FlowType </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#toFlowType">toFlowType</a></b>(const QString &amp;<i> key</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QextSerialPort::ParityType </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#toParityType">toParityType</a></b>(const QString &amp;<i> key</i>, bool *<i> ok</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QextSerialPort::StopBitsType </td><td class="memItemRight bottomAlign"><b><a href="qextserialhelper.html#toStopBitsType">toStopBitsType</a></b>(const QString &amp;<i> key</i>, bool *<i> ok</i> = 0)</td></tr>
</table>
<ul>
<li class="fn">10 static public members inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#properties">QObject</a></li>
<li class="fn">30 public functions inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#public-functions">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#public-slots">QObject</a></li>
<li class="fn">2 signal inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#signals">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#public-variables">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="http://doc.qt.nokia.com/qt5/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QextSerialHelper-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QextSerialHelper class provides some convenient functions to ease the use of <a href="qextserialport.html">QextSerialPort</a>.</p>
</div>
<!-- @@@QextSerialHelper -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$fromBaudRateType[overload1]$$$fromBaudRateTypeQextSerialPort::BaudRateTypebool* -->
<h3 class="fn"><a name="fromBaudRateType"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> QextSerialHelper::<span class="name">fromBaudRateType</span>(<span class="type"><a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BaudRateType</a></span><i> value</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Returns the string representation of <a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BaudRateType</a> <i>value</i>. Returns a default string &quot;BAUD9600&quot; if the conversion fails, for example, (<a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BaudRateType</a>)9999 is passed as parameter.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#toBaudRateType">toBaudRateType</a>().</p>
<!-- @@@fromBaudRateType -->
<!-- $$$fromDataBitsType[overload1]$$$fromDataBitsTypeQextSerialPort::DataBitsTypebool* -->
<h3 class="fn"><a name="fromDataBitsType"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> QextSerialHelper::<span class="name">fromDataBitsType</span>(<span class="type"><a href="qextserialport.html#DataBitsType-enum">QextSerialPort::DataBitsType</a></span><i> value</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Returns the string representation of <a href="qextserialport.html#DataBitsType-enum">QextSerialPort::DataBitsType</a> <i>value</i>. Returns a default string &quot;DATA_8&quot; if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#toDataBitsType">toDataBitsType</a>().</p>
<!-- @@@fromDataBitsType -->
<!-- $$$fromFlowType[overload1]$$$fromFlowTypeQextSerialPort::FlowTypebool* -->
<h3 class="fn"><a name="fromFlowType"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> QextSerialHelper::<span class="name">fromFlowType</span>(<span class="type"><a href="qextserialport.html#FlowType-enum">QextSerialPort::FlowType</a></span><i> value</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Returns the string representation of <a href="qextserialport.html#FlowType-enum">QextSerialPort::FlowType</a> <i>value</i>. Returns a default string &quot;FLOW_OFF&quot; if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#toFlowType">toFlowType</a>().</p>
<!-- @@@fromFlowType -->
<!-- $$$fromParityType[overload1]$$$fromParityTypeQextSerialPort::ParityTypebool* -->
<h3 class="fn"><a name="fromParityType"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> QextSerialHelper::<span class="name">fromParityType</span>(<span class="type"><a href="qextserialport.html#ParityType-enum">QextSerialPort::ParityType</a></span><i> value</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Returns the string representation of <a href="qextserialport.html#ParityType-enum">QextSerialPort::ParityType</a> <i>value</i>. Returns a default string &quot;PAR_NONE&quot; if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#toParityType">toParityType</a>().</p>
<!-- @@@fromParityType -->
<!-- $$$fromStopBitsType[overload1]$$$fromStopBitsTypeQextSerialPort::StopBitsTypebool* -->
<h3 class="fn"><a name="fromStopBitsType"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> QextSerialHelper::<span class="name">fromStopBitsType</span>(<span class="type"><a href="qextserialport.html#StopBitsType-enum">QextSerialPort::StopBitsType</a></span><i> value</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Returns the string representation of <a href="qextserialport.html#StopBitsType-enum">QextSerialPort::StopBitsType</a> <i>value</i>. Returns a default string &quot;STOP_1&quot; if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#toStopBitsType">toStopBitsType</a>().</p>
<!-- @@@fromStopBitsType -->
<!-- $$$getBaudRateList[overload1]$$$getBaudRateList -->
<h3 class="fn"><a name="getBaudRateList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getBaudRateList</span>()<tt> [static]</tt></h3>
<p>Returns available baudrate names.</p>
<!-- @@@getBaudRateList -->
<!-- $$$getDataBitsList[overload1]$$$getDataBitsList -->
<h3 class="fn"><a name="getDataBitsList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getDataBitsList</span>()<tt> [static]</tt></h3>
<p>Returns available databits names.</p>
<!-- @@@getDataBitsList -->
<!-- $$$getFlowList[overload1]$$$getFlowList -->
<h3 class="fn"><a name="getFlowList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getFlowList</span>()<tt> [static]</tt></h3>
<p>Returns available flowcontrol names.</p>
<!-- @@@getFlowList -->
<!-- $$$getParityList[overload1]$$$getParityList -->
<h3 class="fn"><a name="getParityList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getParityList</span>()<tt> [static]</tt></h3>
<p>Returns available parity names.</p>
<!-- @@@getParityList -->
<!-- $$$getPortNameList[overload1]$$$getPortNameList -->
<h3 class="fn"><a name="getPortNameList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getPortNameList</span>()<tt> [static]</tt></h3>
<p>Returns available port names.</p>
<!-- @@@getPortNameList -->
<!-- $$$getStopBitsList[overload1]$$$getStopBitsList -->
<h3 class="fn"><a name="getStopBitsList"></a><span class="type"><a href="http://doc.qt.nokia.com/qt5/qstringlist.html">QStringList</a></span> QextSerialHelper::<span class="name">getStopBitsList</span>()<tt> [static]</tt></h3>
<p>Returns available stopbits names.</p>
<!-- @@@getStopBitsList -->
<!-- $$$toBaudRateType[overload1]$$$toBaudRateTypeconstQString&bool* -->
<h3 class="fn"><a name="toBaudRateType"></a><span class="type"><a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BaudRateType</a></span> QextSerialHelper::<span class="name">toBaudRateType</span>(const <span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> &amp;<i> key</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Converts the string <i>key</i> to <a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BaudRateType</a> value. Returns a default value <a href="qextserialport.html#BaudRateType-enum">QextSerialPort::BAUD9600</a> if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#fromBaudRateType">fromBaudRateType</a>().</p>
<!-- @@@toBaudRateType -->
<!-- $$$toDataBitsType[overload1]$$$toDataBitsTypeconstQString&bool* -->
<h3 class="fn"><a name="toDataBitsType"></a><span class="type"><a href="qextserialport.html#DataBitsType-enum">QextSerialPort::DataBitsType</a></span> QextSerialHelper::<span class="name">toDataBitsType</span>(const <span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> &amp;<i> key</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Converts the string <i>key</i> to <a href="qextserialport.html#DataBitsType-enum">QextSerialPort::DataBitsType</a> value. Returns a default value <a href="qextserialport.html#DataBitsType-enum">QextSerialPort::DATA_8</a> if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#fromDataBitsType">fromDataBitsType</a>().</p>
<!-- @@@toDataBitsType -->
<!-- $$$toFlowType[overload1]$$$toFlowTypeconstQString&bool* -->
<h3 class="fn"><a name="toFlowType"></a><span class="type"><a href="qextserialport.html#FlowType-enum">QextSerialPort::FlowType</a></span> QextSerialHelper::<span class="name">toFlowType</span>(const <span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> &amp;<i> key</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Converts the string <i>key</i> to <a href="qextserialport.html#FlowType-enum">QextSerialPort::FlowType</a> value. Returns a default value <a href="qextserialport.html#FlowType-enum">QextSerialPort::FLOW_OFF</a> if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#fromFlowType">fromFlowType</a>().</p>
<!-- @@@toFlowType -->
<!-- $$$toParityType[overload1]$$$toParityTypeconstQString&bool* -->
<h3 class="fn"><a name="toParityType"></a><span class="type"><a href="qextserialport.html#ParityType-enum">QextSerialPort::ParityType</a></span> QextSerialHelper::<span class="name">toParityType</span>(const <span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> &amp;<i> key</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Converts the string <i>key</i> to <a href="qextserialport.html#ParityType-enum">QextSerialPort::ParityType</a> value. Returns a default value <a href="qextserialport.html#ParityType-enum">QextSerialPort::PAR_NONE</a> if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#fromParityType">fromParityType</a>().</p>
<!-- @@@toParityType -->
<!-- $$$toStopBitsType[overload1]$$$toStopBitsTypeconstQString&bool* -->
<h3 class="fn"><a name="toStopBitsType"></a><span class="type"><a href="qextserialport.html#StopBitsType-enum">QextSerialPort::StopBitsType</a></span> QextSerialHelper::<span class="name">toStopBitsType</span>(const <span class="type"><a href="http://doc.qt.nokia.com/qt5/qstring.html">QString</a></span> &amp;<i> key</i>, <span class="type">bool</span> *<i> ok</i> = 0)<tt> [static]</tt></h3>
<p>Converts the string <i>key</i> to <a href="qextserialport.html#StopBitsType-enum">QextSerialPort::StopBitsType</a> value. Returns a default value <a href="qextserialport.html#StopBitsType-enum">QextSerialPort::STOP_1</a> if the conversion fails.</p>
<p>If a conversion error occurs, * <i>ok</i> is set to false; otherwise * <i>ok</i> is set to true.</p>
<p><b>See also </b><a href="qextserialhelper.html#fromStopBitsType">fromStopBitsType</a>().</p>
<!-- @@@toStopBitsType -->
</div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2000-2012</td>
<td width="20%" align="center"><a href="http://code.google.com/p/qextserialport">QtExtSerialPort Project</a></td>
<td width="40%" align="right"><div align="right">QextSerialPort Manual</div></td>
</tr></table></div></address></body>
</html>
